<template>
    <div>
        <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="消防系统纬度" name="first">
                <fire-system-dimension></fire-system-dimension>
            </el-tab-pane>
            <el-tab-pane label="时间纬度" name="second">
                <time-dimension v-if="!secondModelFirseLoad"></time-dimension>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>
<script>
import FireSystemDimension from './PageModel/FireSystemDimension'
import TimeDimension from './PageModel/TimeDimension'

export default {
    name: 'MaintenAnalysis',
    components: {
        FireSystemDimension,
        TimeDimension,
    },
    data() {
        return {
            activeName: 'first',
            secondModelFirseLoad: true, // 第二模块是否第一次加载
        }
    },
    methods: {
        handleClick() {
            if (this.activeName == 'second' && this.secondModelFirseLoad) {
                this.secondModelFirseLoad = false
            }
        }
    }
}
</script>
